<include file="Common/header" />

<title>栏目管理</title>
<style>
.norag{border:none !important; font-weight:normal !important}

</style>
</head>
<body>
<nav class="breadcrumb">
<div class="menu_4"> 
<a href="{:U('index')}" class="active">栏目列表</a>
<a href="{:U('edit')}" >添加栏目</a> 
<a href="{:U('page_edit')}" >添加单页</a> 
<a href="{:U('link_edit')}" >添加外部链接栏目</a> 
<font  class="btn btn-success radius categoryupdate" >更新栏目地址</font> 

</div> 



<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont"></i></a></nav>




<div class="pd-20">
  <form class="J_ajaxForm" action="" method="post">
    <table class="table table-border table-bg table-hover" style="border-top:none">
   
    
        <colgroup>
        <col width="38">
        <col width="55">
        <col>
        <col width="80">
        <col width="100">
        <col width="50">
        <col width="100">
        <col width="250">
        </colgroup>
        <thead>
          <tr>
            <th align="center" class="norag">排序</th>
            <th align="center" class="norag">栏目ID</th>
            <th class="norag">栏目名称</th>
            <th align="center" class="norag">栏目类型</th>
            <th class="norag">所属模型</th>
            <th align="center" class="norag">访问</th>
            <th align="center" class="norag">域名绑定须知</th>
            <th align="center" class="norag">管理操作</th>
          </tr>
        </thead> 
        <tbody> 
    
    {$Category}
            </tbody></table>
     
   


<div style="height:60px;"></div>
    <div class="btn_wrap" style=" position:fixed; z-index:999; bottom:0; background:#EBEBEB; width:100%;  ">
      <div class="btn_wrap_pd" style="margin:10px 20px;">
        <button class="btn btn-primary radius " type="submit" style="padding:0 22px">排序</button>
      </div>
    </div>
  </form> 
  
  </div>
  <div style="position:fixed; bottom:0; height:51px; width:100%; background:#EBEBEB"></div>


<script type="text/javascript">
$(function(){
   
	$(".J_ajaxForm").Validform({
		ajaxPost:true,
		tiptype:function(){},
 		callback:function(data){
			if(data.status=="y"){
				layer.msg('更新成功!!',{icon:1,time:1000},function(){location.href='';});
			}
		}
	});
	
$(".categoryupdate").click(function(){

	updateurl(0);
	
	});

 
})
function _updateurl(num_)  
    {  
        return function()  
        {  
            updateurl(num_);  
        }  
    }  

function updateurl(num_){
		$.post(
	"{:U('updateurl')}",{num:num_},function(data){
		num_=data.page;
		if(num_<0){
			layer.msg('更新完成');
			}else{
				layer.msg('共'+data.count+'条,每页更新'+data.num+'条,已更新第'+data.page+'页!');
			} 
		 if(num_>0){ 
			 setTimeout(_updateurl(num_),500); 
			 }
		
		},'json'
	
	);
	
	
	
	}
	
 </script>




</body>
</html>